<!--
*******************************************************************************
 * Copyright © 2022-2023 VMware, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 *
 * @author: Huaqiao Zhang, <huaqiaoz@vmware.com>
 *******************************************************************************
 -->

<form class="has-validation">
    <div class="form-group row">
        <label class="col-sm-2 col-form-label">ProfileName</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="ProfileName" [(ngModel)]="pushToCore.Parameters.ProfileName">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2 col-form-label">DeviceName</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="DeviceName" [(ngModel)]="pushToCore.Parameters.DeviceName">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2 col-form-label">ResourceName</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="ResourceName" [(ngModel)]="pushToCore.Parameters.ResourceName">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-sm-2 col-form-label">
            <span>ValueType</span>
            <span class="fa fa-question-circle-o fa-lg ml-2" role="button" data-html="false" data-animation="true"  data-trigger="focus" data-toggle="popover" title="tips" 
            data-content="Value type to use the new Event Reading's value type"></span>
        </label>
        <div class="col-sm-10">
            <select class="custom-select"  name="ValueType" [(ngModel)]="pushToCore.Parameters.ValueType">
                <option value="Bool">Bool</option>
                <option value="Int8">Int8</option>
                <option value="Int64">Int64</option>
                <option value="Uint8">Uint8</option>
                <option value="Uint64">Uint64</option>
                <option value="Float32">Float32</option>
                <option value="Float64">Float64</option>
                <option value="String">String</option>
                <option value="Binary">Binary</option>
                <option value="Object">Object</option>

                <option value="Float32Array">Float32Array</option>
                <option value="BoolArray">BoolArray</option>
            </select>
        </div>
    </div>
    <div class="form-group row" *ngIf="valueTypeIsBinary()">
        <label class="col-sm-2 col-form-label">
            <span>MediaType</span>
            <span class="fa fa-question-circle-o fa-lg ml-2" role="button" data-html="false" data-animation="true"  data-trigger="focus" data-toggle="popover" title="tips" 
            data-content="Media type to use the new Event Reading's value type. Required when the value type is Binary"></span>
        </label>
        <div class="col-sm-10">
            <input type="text" class="form-control" [class.is-invalid]="!pushToCore.Parameters.MediaType" name="MediaType" [(ngModel)]="pushToCore.Parameters.MediaType">
            <div class="invalid-feedback">
                <small i18n>the MediaType can't be empty!</small>
            </div>
        </div>
    </div>
</form>